import {createRouter, createWebHistory} from 'vue-router'
import PkIndexView from '../views/pk/PkIndexView'
import RecordIndexView from '../views/record/RecordIndexView'
import RankListIndexView from '../views/ranklist/RankListIndexView.vue'
import UserBotIndexView from '../views/user/bot/UserBotIndexView'
import NotFound from '../views/error/NotFound'

const routes = [
    {
        path: "/",
        name: "home",
        redirect: "/pk/"
    },
    {
        path: "/pk/",
        name: "pkIndex",
        component: PkIndexView,
    },
    {
        path: "/record/",
        name: "recordIndex",
        component: RecordIndexView,
    },
    {
        path: "/rankList/",
        name: "rankListIndex",
        component: RankListIndexView,
    },
    {
        path: "/user/bot/",
        name: "userBotIndex",
        component: UserBotIndexView,
    },
    {
        path: "/404/",
        name: "404",
        component: NotFound,
    },
    {
        path: "/:catchAll(.*)",
        redirect: "/404/"
    }

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
